package com.power.sifa.std.dao;

import com.power.sifa.std.model.Std_incourt;
import com.power.sifa.std.model.Std_mgrcate;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.Repository;
import org.springframework.data.repository.query.Param;

import javax.transaction.Transactional;
import java.io.Serializable;
import java.util.List;

/**
 * 审理信息出庭类型 持久层(hibernate)
 */

public interface Std_incourtDao extends JpaRepository<Std_incourt, Serializable>, JpaSpecificationExecutor<Std_incourt>, Repository<Std_incourt, Serializable>, Std_incourtDaoCustom<Std_incourt, Serializable> {

    @Modifying
    @Transactional
    @Query("delete  from Std_incourt s where  s.id in (:ids) ")
    void removeByIds(@Param("ids") List<Integer> ids);

    @Query(" from Std_incourt s")
    List<Std_incourt> list();
}
